﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ManageMenu_Default : GuoShuCan.SDK.Web.ServerControls.Manage.PageBase
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        GuoShuCan.SDK.Web.ServerControls.AsyncListLoadingWaitControl.GetCurrent(this).RegisterControl(this.Master1);
        //获取本地化内容。
        this.Title = this.GetLocalResourceObject("Title").ToString();
        //设置本地化资源。
        /*
        this.master.HeadItems[0].Text = this.GetLocalResourceObject("WebInfo").ToString();
        this.master.HeadItems[1].Text = this.GetLocalResourceObject("WebConfig").ToString();
        this.master.HeadItems[2].Text = this.GetLocalResourceObject("CN").ToString();
        this.master.HeadItems[3].Text = this.GetLocalResourceObject("TW").ToString();
        this.master.HeadItems[4].Text = this.GetLocalResourceObject("US").ToString();
        this.master.HeadItems[5].Text = this.GetLocalResourceObject("KR").ToString();
        this.master.HeadItems[6].Text = this.GetLocalResourceObject("JP").ToString();
        this.master.HeadItems[7].Text = this.GetLocalResourceObject("IsMenuBack").ToString();
        this.master.HeadItems[7].ToolTip = this.GetLocalResourceObject("IsMenuBack_Title").ToString();
         * 
         * 
         */
        this.Master1.HeadItems[0].Text = this.GetLocalResourceObject("WebInfo").ToString();
        this.Master1.HeadItems[1].Text = this.GetLocalResourceObject("WebConfig").ToString();
        this.Master1.HeadItems[2].Text = this.GetLocalResourceObject("CN").ToString();
        this.Master1.HeadItems[3].Text = this.GetLocalResourceObject("TW").ToString();
        this.Master1.HeadItems[4].Text = this.GetLocalResourceObject("US").ToString();
        this.Master1.HeadItems[6].Text = this.GetLocalResourceObject("KR").ToString();
        this.Master1.HeadItems[5].Text = this.GetLocalResourceObject("JP").ToString();
        /*
        this.master.CenterLeftMenuTitles[0].Text = this.GetLocalResourceObject("FileUpload").ToString();
        this.master.CenterLeftMenuTitles[0].Buttons[0].Button.Text = this.GetLocalResourceObject("FileUpload1").ToString();
        this.master.CenterLeftMenuTitles[0].Buttons[1].Button.Text = this.GetLocalResourceObject("FileUpload2").ToString();
        this.master.CenterLeftMenuTitles[0].Buttons[2].Button.Text = this.GetLocalResourceObject("FileUpload3").ToString();
        //
        this.master.CenterLeftMenuTitles[1].Text = this.GetLocalResourceObject("EditList").ToString();
        this.master.CenterLeftMenuTitles[1].Buttons[0].Button.Text = this.GetLocalResourceObject("EditListAdd").ToString();
        this.master.CenterLeftMenuTitles[1].Buttons[1].Button.Text = this.GetLocalResourceObject("EditListManagement").ToString();

        this.master.CenterLeftMenuTitles[2].Text = this.GetLocalResourceObject("Fucks").ToString();
        this.master.CenterLeftMenuTitles[2].Buttons[0].Button.Text = this.GetLocalResourceObject("Fucks1").ToString();
        //
        this.master.CenterLeftMenuTitles[3].Text = this.GetLocalResourceObject("Classification").ToString();
        this.master.CenterLeftMenuTitles[3].Buttons[0].Button.Text = this.GetLocalResourceObject("Classification1").ToString();
        this.master.CenterLeftMenuTitles[3].Buttons[1].Button.Text = this.GetLocalResourceObject("Classification2").ToString();
        */
        this.Master1.AllUpdate();
    }
    /// <summary>
    /// 更新浏览器标题。
    /// </summary>
    //protected override void OnUpdateTitle()
    //{
    //    this.Page.Title = ((IGetLocalResourceObject)this.Page).GetLocalResourceObject("Title").ToString() + (" - [ " + this.GetLocalResourceObject("Title").ToString() + " ]");
    // }
    protected void Page_Load(object sender, EventArgs e)
    {


        /*
        this.master.CenterLeftMenuTitles[0].Text = this.GetLocalResourceObject("FileUpload").ToString();
        this.master.CenterLeftMenuTitles[0].Buttons[0].Button.Text = this.GetLocalResourceObject("FileUpload1").ToString();
        this.master.CenterLeftMenuTitles[0].Buttons[1].Button.Text = this.GetLocalResourceObject("FileUpload2").ToString();
        this.master.CenterLeftMenuTitles[0].Buttons[2].Button.Text = this.GetLocalResourceObject("FileUpload3").ToString();
        //
        this.master.CenterLeftMenuTitles[1].Text = this.GetLocalResourceObject("EditList").ToString();
        this.master.CenterLeftMenuTitles[1].Buttons[0].Button.Text = this.GetLocalResourceObject("EditListAdd").ToString();
        this.master.CenterLeftMenuTitles[1].Buttons[1].Button.Text = this.GetLocalResourceObject("EditListManagement").ToString();

        this.master.CenterLeftMenuTitles[2].Text = this.GetLocalResourceObject("Fucks").ToString();
        this.master.CenterLeftMenuTitles[2].Buttons[0].Button.Text = this.GetLocalResourceObject("Fucks1").ToString();
        //
        this.master.CenterLeftMenuTitles[3].Text = this.GetLocalResourceObject("Classification").ToString();
        this.master.CenterLeftMenuTitles[3].Buttons[0].Button.Text = this.GetLocalResourceObject("Classification1").ToString();
        this.master.CenterLeftMenuTitles[3].Buttons[1].Button.Text = this.GetLocalResourceObject("Classification2").ToString();
        //
        this.master.AllUpdate();
         */ 
    }
    /// <summary>
    /// 
    /// </summary>
    //protected override void OnUpdateTitle()
    //{
    //protected override void OnUpdateTitle()
    //{
    //this.Page.Title = ((IGetLocalResourceObject)this.Page).GetLocalResourceObject("Title").ToString() + (" - [ " + this.GetLocalResourceObject("Title").ToString() + " ]");
    // }
    // }
    protected void Master1_HeadItemClick(object sender, GuoShuCan.SDK.Web.ServerControls.Manage.HeadItemClickEventArgs e)
    {
        //GuoShuCan.SDK.Web.ServerControls.Manage.Master.GetCurrent(this.Page).CenterHeadCenterCellUpdatePanel.ContentTemplateContainer.Controls.Clear();
        //GuoShuCan.SDK.Web.ServerControls.Manage.Master.GetCurrent(this.Page).CenterHeadCenterCellUpdatePanel.Update();
        //



        if (e.CommandArgument.Equals("Language"))
        {
            this.UpdateLanguage(e.CommandName);
        }

        Master1.CenterHeadLeftCellUpdatePanel.ContentTemplateContainer.Controls.Clear();
        Master1.CenterHeadLeftCellUpdatePanel.Update();



        GuoShuCan.SDK.Web.ServerControls.AsyncListLoadingWaitControl.GetCurrent(this).UpdateComplete();

    }
    protected void Master1_MenuAction(object sender, GuoShuCan.SDK.Web.ServerControls.Manage.CenterLeftMenuActionEventArgs e)
    {
        GuoShuCan.SDK.Web.ServerControls.AsyncListLoadingWaitControl.GetCurrent(this).UpdateComplete();
    }
    protected void Master1_MenuCommand(object sender, GuoShuCan.SDK.Web.ServerControls.Manage.CenterLeftMenuCommandEventArgs e)
    {
        //GuoShuCan.SDK.Web.ServerControls.Manage.Master.GetCurrent(this.Page).CenterHeadCenterCellUpdatePanel.ContentTemplateContainer.Controls.Clear();
        //GuoShuCan.SDK.Web.ServerControls.Manage.Master.GetCurrent(this.Page).CenterHeadCenterCellUpdatePanel.Update();
        //
        Master1.CenterHeadLeftCellUpdatePanel.ContentTemplateContainer.Controls.Clear();
        Master1.CenterHeadLeftCellUpdatePanel.Update();
        GuoShuCan.SDK.Web.ServerControls.AsyncListLoadingWaitControl.GetCurrent(this).UpdateComplete();
    }
    protected void Master1_HeadLogout(object sender, CommandEventArgs e)
    {

    }
}
